SlkSPSiteMapping Class

Represents a mapping from an SPSite to a SharePoint Learning Kit LearningStore database.

Namespace: Microsoft.SharePointLearningKit

Assembly: Microsoft.SharePointLearningKit.dll

Syntax
C#

public class SlkSPSiteMapping : SPPersistedObject

Constructors
Name Description
Ð SlkSPSiteMapping ()

Initializes an instance of this class. This constructor is only used for deserialization and should not be used directly by applications.

Properties
Name Description
Ð DatabaseConnectionString

Gets the SQL Server connection string specified by this mapping's DatabaseServer and DatabaseName properties. Returns null if either DatabaseServer or DatabaseName are null.

Ð DatabaseName

Sets or gets the name of the LearningStore database represented by this SPSite-to-LearningStore mapping, or null if none.

Ð DatabaseServer

Sets or gets the name of the LearningStore database server represented by this SPSite-to-LearningStore mapping, or null if none. Note that if a SQL Server user ID and password are used to connect to the LearningStore database instead of integrated authentication, DatabaseServer will contain a fragment of a connection string such as "MyServer;user id=myacct;password=mypassword".

Ð DatabaseServerConnectionString

Gets the SQL Server connection string specified by this mapping's DatabaseServer property; this connection string ignores DatabaseName. Returns null if DatabaseServer is null.

Ð InstructorPermission

Sets or gets the name of SharePoint permission used to identify instructors.

Ð LearnerPermission

Sets or gets the name of SharePoint permission used to identify learners.

Ð SPSiteGuid

Gets the GUID of the SPSite represented by this SPSite-to-LearningStore mapping.

Methods
Name Description
ÐS GetMapping (Guid)

Returns the SPSite-to-LearningStore mapping represented by a given SPSite GUID. If no such mapping exists, an exception is thrown.

ÐS GetMapping (Guid, out SlkSPSiteMapping)

Retrieves the SPSite-to-LearningStore mapping represented by a given SPSite GUID. If no such mapping exists, a new mapping object is created -- in that case, the caller should set the properties of the SlkSPSiteMapping object to their correct values and then call Update to store the mapping into the SharePoint configuration database.

ÐS GetMappings

Returns the collection of SlkSPSiteMapping objects stored in SharePoint's configuration database.